package ru.st.selenium.pages;

import static org.openqa.selenium.support.ui.ExpectedConditions.alertIsPresent;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public class FilmViewPage extends Page {
	
	public FilmViewPage(PageManager pages) {
		super(pages);
	}
	
	@FindBy(css = "img[alt=\"Remove\"]")
    private WebElement removeButton; 

	public FilmViewPage clickRemoveButton() {
		removeButton.click();
		wait.until(alertIsPresent()).accept();
		return this;		
	}
}
